<h3>All Orders</h3>
<table class="table">
  <thead>
    <tr>
      <th>Order date</th>
      <th>Total price</th>
      <th>Customer</th>
      <th>State</th>
      <th>Product Lists</th>
      <th>Detail</th>
    </tr>
  </thead>
  <tbody>
    <% @orders.each do |order| %>
    <tr>
      <td> <%= order.created_at %> </td>
      <td> <%= order.total %> CNY </td>
      <td> <%= order.user.email %> </td>
      <td> <%= order.aasm_state %> </td>
      <td> <%= order.product_lists.count %> </td>
      <td> <%= link_to "Show", admin_order_path(order) %> </td>
    </tr>
    <% end %>
  </tbody>
</table>
